{* Smarty *}

{*
 *  This file is part of Urd.
 *
 *  Urd is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *  Urd is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program. See the file "COPYING". If it does not
 *  exist, see <http://www.gnu.org/licenses/>.
 *
 * $LastChangedDate: 2008-07-16 23:53:30 +0200 (Wed, 16 Jul 2008) $
 * $Rev: 1301 $
 * $Author: gavinspearhead $
 * $Id: admin_control.tpl 1301 2008-07-16 21:53:30Z gavinspearhead $
 *}

{if $isconnected == 1}
<img src="{$IMGDIR}/standby.png" onclick="javascript:AdminCommands('shutdown');"          class="buttonlike" {popup text=$LN_adminshutdown } alt="{$LN_adminshutdown}"/>
<img src="{$IMGDIR}/reload.png" onclick="javascript:AdminCommands('restart');"            class="buttonlike" {popup text=$LN_adminrestart } alt="{$LN_adminrestart}"/>
<img src="{$IMGDIR}/pause.png" onclick="javascript:AdminCommands('pause');"               class="buttonlike" {popup text=$LN_adminpause } alt="{$LN_adminpause}"/>
<img src="{$IMGDIR}/play.png" onclick="javascript:AdminCommands('continue');"             class="buttonlike" {popup text=$LN_admincontinue } alt="{$LN_admincontinue}"/>
<img src="{$IMGDIR}/clearlist.png" onclick="javascript:AdminCommands('clear');"           class="buttonlike" {popup text=$LN_adminclear } alt="{$LN_adminclear}"/>
<img src="{$IMGDIR}/clear.png" onclick="javascript:AdminCommands('cleandb');"             class="buttonlike" {popup text=$LN_admincleandb } alt="{$LN_admincleandb}"/>
<img src="{$IMGDIR}/clearcomplete.png" onclick="javascript:AdminCommands('removeready');" class="buttonlike" {popup text=$LN_adminremoveready } alt="{$LN_adminremoveready}"/>
<p></p>
<table>
<tr><td><b>{$LN_control_uptime}</b>:</td><td><i>{$uptime_info}</i></td></tr>
<tr><td><b>{$LN_control_load}</b>:</td><td><i>{$load_info[1]} --  {$load_info[2]} -- {$load_info[3]}</i></td></tr>
</table>

<h3>{$LN_control_options}</h3>
<table>
{if $disable_urdland eq 0}
<tr><td><a href="#" onclick="javascript:control_action('sendsetinfo',  '{$LN_adminsendsetinfo} {$LN_success}', '{$LN_adminsendsetinfo} {$LN_failed}');">{$LN_adminsendsetinfo}</a></td>
<td><a href="#" onclick="javascript:control_action('getsetinfo',  '{$LN_admingetsetinfo} {$LN_success}', '{$LN_admingetsetinfo} {$LN_failed}');">{$LN_admingetsetinfo}</a></td></tr>
{/if}
<tr><td><a href="#" onclick="javascript:control_action('optimise',  '{$LN_adminuoptimisedb} {$LN_success}', '{$LN_adminoptimisedb} {$LN_failed}');">{$LN_adminoptimisedb}</a></td>
<td><a href="#" onclick="javascript:control_action('cleandir',  '{$LN_admincleandir} {$LN_success}', '{$LN_admincleandir} {$LN_failed}');">{$LN_admincleandir}</a></td></tr>
<tr><td><a href="#" onclick="javascript:control_action('checkversion',  '{$LN_admincheckversion} {$LN_success}', '{$LN_admincheckversion} {$LN_failed}');">{$LN_admincheckversion}</a></td>
<td><a href="#" onclick="javascript:control_action('updategroups',  '{$LN_adminupdatenglist} {$LN_success}', '{$LN_adminupdatenglist} {$LN_failed}');">{$LN_adminupdatenglist}</a></td>  </tr>
<tr><td><a href="#" onclick="javascript:control_action('updatearticles',  '{$LN_adminupdateallngs} {$LN_success}', '{$LN_adminupdateeallngs} {$LN_failed}');">{$LN_adminupdateallngs}</a></td>
<td><a href="#" onclick="javascript:control_action('gensetsarticles',  '{$LN_admingensetsallngs} {$LN_success}', '{$LN_admingensetsallngs} {$LN_failed}');">{$LN_admingensetsallngs}</a></td></tr>
<tr><td><a href="#" onclick="javascript:control_action('expirearticles',  '{$LN_adminexpireallngs} {$LN_success}', '{$LN_adminexpireallngs} {$LN_failed}');">{$LN_adminexpireallngs}</a></td>
<td><a href="#" onclick="javascript:control_action_confirm('purgearticles',  '{$LN_adminpurgeallngs} {$LN_success}', '{$LN_adminpurgeallngs} {$LN_failed}','{$LN_adminpurgeallngs}?' );">{$LN_adminpurgeallngs}</a></td></tr>
<tr><td><a href="#" onclick="javascript:control_action('expirerssall',  '{$LN_adminexpireallrss} {$LN_success}', '{$LN_adminexpireallrss} {$LN_failed}');">{$LN_adminexpireallrss}</a></td>
<td><a href="#" onclick="javascript:control_action_confirm('purgerssall',  '{$LN_adminpurgeallrss} {$LN_success}', '{$LN_adminpurgeallrss} {$LN_failed}', '{$LN_adminpurgeallrss}?');">{$LN_adminpurgeallrss}</a></td></tr>
<tr><td><a href="#" onclick="javascript:control_action('updaterssall',  '{$LN_adminupdateallrss} {$LN_success}', '{$LN_adminupdateeallrss} {$LN_failed}');">{$LN_adminupdateallrss}</a></td>
<td><a href="#" onclick="javascript:control_action('findservers',  '{$LN_adminfindservers} {$LN_success}', '{$LN_adminfindservers} {$LN_failed}');">{$LN_adminfindservers}</a></td></tr>
<tr><td><a href="action.php?cmd=export_all">{$LN_adminexport_all}</a></td>
<td><a href="#" onclick="javascript:show_popup_remote('loadsettingsdiv', 'loadsettings', '{$referrer}', 'import_all');">{$LN_adminimport_all}</a></td>
</tr>
</table>
<br/>
<h4>{$LN_control_threads}</h4>
{if $threads_info neq ''}
{foreach from=$threads_info item=t}
{$t}<br/>
{/foreach}
{/if}

<h4>{$LN_control_queue}</h4>
{if $queue_info neq ''}
{foreach from=$queue_info item=q}
{$q}<br/>
{/foreach}
{/if}

<h4>{$LN_control_jobs}</h4>
{if $jobs_info neq ''}
{foreach from=$jobs_info item=j}
{$j}<br/>
{/foreach}
{/if}

<h4>{$LN_control_servers}</h4>
{if $servers_info neq ''}
{foreach from=$servers_info item=j}
{$j}<br/>
{/foreach}
{/if}
<p>&nbsp;</p>

{else}
<img src="{$IMGDIR}/standby.png" onclick="javascript:AdminCommands('poweron');" class="buttonlike" {popup text=$LN_adminpoweron } alt="{$LN_adminpoweron}" />
{/if}

<div><input type="hidden" name="challenge" id="challenge_control" value="{$challenge}"/></div>
